<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8">
<title>学生成绩管理</title>
<link rel="stylesheet" href="../css/main.css" />
<script type="text/javascript" src="../js/jquery-1.8.3.min.js"></script>
</head>
<body>
	<!--顶部-->
	<div class="head clear">
		<h1 align="center" class="head-title">学生信息管理系统</h1>
	</div>
	<!--中部-主内容区域-->
	<div class="center clear">
		<div class="left-memu clear" id="memu">
			<div class="hesd-user"> 
				欢迎<span></span>
			</div>
			<a href="init.jsp" target="mainFrame" class="selected-a">首页</a>
			<a href="info.jsp" target="mainFrame">信息管理</a> 
			<a href="addStuInfo.jsp" target="mainFrame">新增学生</a>
			<a href="import.jsp" target="mainFrame">数据导入</a> 
			<a href="defult.jsp"  target="mainFrame">数据导出</a>
			<a href="defult.jsp" target="mainFrame">成绩管理</a> 
			<a href="defult.jsp" target="mainFrame">其他版块</a>
		</div>
		<div class="main" id="main">
			<iframe src="info.jsp" class="main-frame" name="mainFrame"></iframe>
		</div>
	</div>
	<!--中部-主内容区域  END-->
</body>
	<script type="text/javascript">
		window.onload=function(){
		/*左侧菜单栏动态样式*/
		var aList = document.getElementById("memu").getElementsByTagName("a");
		for (var i=0; i<aList.length; i++) {
			aList[i].onclick=function(){
				this.className="selected-a";
				
				for (var i=0; i<aList.length; i++) { 
					console.log(aList[i].innerHTML!=this.innerHTML);
					if(aList[i].innerHTML!=this.innerHTML){  
						aList[i].className="default-a";
					}else{
						
					}
				}
			};
		}
		/*中部区域高度自适应*/
		var a= window.innerHeight-100;
		document.getElementById("main").style.height=a+'px';
		document.getElementById("memu").style.height=a+'px';
		
		}

		/*
			从cookie中得到用户名
		*/
		
		// 获取cookie中的参数
 		var user="${cookie.user.value}";
 		// 解码
 		user=decodeURIComponent(user); // 得到中文
 		// 转json
 		// user = eval( '('+user+')' );
 		// 显示到页面
 		$(".hesd-user span").html(user.uname);
	</script>
</html> 